import { useQuery } from '@tanstack/vue-query'
import { getExpertList } from '@/axios/api/expert'
import { toValue } from 'vue'

export function useExpertListQuery(params) {
  return useQuery({
    queryKey: ['expertList', toValue(params)],
    queryFn: () => getExpertList(toValue(params)),
    enabled: true,
    refetchOnWindowFocus: false,
    staleTime: 0, // 暂时设为0，确保每次都重新请求
    cacheTime: 0  // 暂时设为0，确保每次都重新请求
  })
}